//
//  DetailDataModel.m
//  SexColorReading
//
//  Created by 殷殷明静 on 16/9/14.
//  Copyright © 2016年 LyMjy. All rights reserved.
//

#import "DetailDataModel.h"

@implementation DetailDataModel
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"atlasItemDTOCollection"]) {
        NSMutableArray <AtlasItemDTO *>*arr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            AtlasItemDTO *atlDTO = [AtlasItemDTO modelWithDic:dic];
            [arr addObject:atlDTO];
        }
        _atlasItemDTOCollection = arr;
    }
    if ([key isEqualToString:@"atlasRelevantDTOCollection"]) {
        NSMutableArray <AtlasRelevantDTO *>*arr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            AtlasRelevantDTO *atrDTO = [AtlasRelevantDTO modelWithDic:dic];
            [arr addObject:atrDTO];
        }
        _atlasRelevantDTOCollection = arr;
    }
    if ([key isEqualToString:@"newsImageInfoList"]) {
        NSMutableArray <NewsImageInfo *>*arr = [NSMutableArray array];
        
        for (NSDictionary *dic in value) {
            NewsImageInfo *newsInfo = [NewsImageInfo modelWithDic:dic];
            [arr addObject:newsInfo];
            
        }
        _newsImageInfoList = arr;
    }

}
@end
